<script type="text/javascript">
var json_code = '{"status":0,"msg":""}';
var wrongUrl = '<?php echo Portal_Urls::base_url();?>';
var ajaxUrl = '<?php echo Portal_Urls::ajax_check_user_security();?>';
var jumpUrl = '<?=$last_url?>';
var panel = new J.ui.panel({
    title:' ',
    content:'个人安全密码:<input id="pwd" name="pwd" type="password"/>',
    ok:'确定',
    cancel:'取消',
    onOk:function(){
        jQuery.ajax({
            async:false,
            url:ajaxUrl,
            data:{pwd:$("#pwd").val()},
            type:'post',
            success:function (data) {
                var data = eval('(' + data + ')');
                if(data.errcode){
                    panel.setOptions({onClose:null});
                    panel.close();
                    location.href=jumpUrl;
                    return;
                }
                $("#pwd").nextAll().remove();
                $('<label style="color: red">'+data.msg+'</label>').insertAfter($("#pwd"));
                return;
            }
        });
    },
    onCancel:function(){
        location.href=wrongUrl;
    },
    onClose:function(){
        location.href=wrongUrl;
        return;
    }
});
</script>